<?php
define('CFG_PATH', getcwd() . "/cfg/cfg.inc.php");
include('include/user.class.php');
session_start();
$_SESSION["CFG_PATH"] = CFG_PATH;

if ($_SESSION['user'] == NULL) {
    header('Location: login/');
} else {
    $user = unserialize($_SESSION['user']);
    $_SESSION['nICKbAME'] = $user->name;
}
?>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link rel="shortcut icon" href="sofcollfavicon.ico"  />
        <title>SoftCollege V2</title>
        <link href="bootstrap/css/bootstrap.css" rel="stylesheet" type="text/css" />
        <link href="js/dialog/dialog.2.0.css" rel="stylesheet" type="text/css" />
        <script src="js/jquery.js" type="text/javascript"></script>
        <script>jQuery.noConflict();</script>
        <script src="bootstrap/js/bootstrap.js"></script>
        <script type="text/javascript" src="js/prototype.js"></script>
        <script src="js/dialog/dialog.2.0.js" type="text/javascript" ></script>
        <script src="js/include.js" type="text/javascript"></script>
    </head>

    <body style="margin: 5px;">
        <form name="form1" method="get" action="main.php">
            <div id="wraper">
                <div class="navbar" style="margin:10px 0px 10px 0px">
                    <div class="navbar-inner">
                        <ul class="nav">
                            <a class="brand" href="#">
                                <div id="logocinde"><img src="img/logocinde.png" width="32" height="32" />&nbsp;SoftCollege App. v2</div>
                            </a>
                            <li class="divider-vertical"></li>
                            <a class="brand" href="#">
                                <div id="mensajes" style="width:750px;text-align: center;font-size: 15px">Usuario:<?php echo " " . strtoupper($user->name) . ". "; ?> <span id="fecha">Guatemala, <?php echo date("D M Y"); ?></span></div>
                            </a>
                            <li class="divider-vertical"></li>
                            <a class="brand" href="logout.php">
                                <div id="exit" style="color:#49afcd">Salir</div>
                            </a>
                        </ul>
                    </div>
                </div>
                <div id="container">
                    <div id="menu" style="height: 40px;margin-bottom: 20px">
                        <?php include("modules/menuconfig/generator.php"); ?>
                    </div>
                    <div id="page" style="border: 0px solid red;" >
                        <iframe src="modules/reports/cfgCalendar.php" id="pantalla" 
                                allowtransparency="" frameborder="0" 
                                style="overflow: visible;height:100%;width:100%"
                                ></iframe>
                    </div>
                </div>
            </div>
        </form>
        <script type="text/javascript">
            var ifr = $('pantalla');
            loadpantalla = function(url) {
                ifr.src = url;
            }
            jQuery(function() {
                jQuery("#page").css("height", "78%");
            });

        </script>
    </body>
</html>
